.TH "nvme_write_zeros" 2 "nvme_write_zeros" "February 2020" "libnvme Manual"
.SH NAME
nvme_write_zeros \- Submit an nvme write zeroes command
.SH SYNOPSIS
.B "int" nvme_write_zeros
.BI "(int " fd ","
.BI "__u32 " nsid ","
.BI "__u64 " slba ","
.BI "__u16 " nlb ","
.BI "__u16 " control ","
.BI "__u32 " reftag ","
.BI "__u16 " apptag ","
.BI "__u16 " appmask ");"
.SH ARGUMENTS
.IP "fd" 12
File descriptor of nvme device
.IP "nsid" 12
Namespace identifier
.IP "slba" 12
Starting logical block
.IP "nlb" 12
Number of logical blocks to clear (0's based value)
.IP "control" 12
Command control flags, see \fIenum nvme_io_control_flags\fP.
.IP "reftag" 12
This field specifies the Initial Logical Block Reference Tag
expected value. Used only if the namespace is formatted to use
end-to-end protection information.
.IP "apptag" 12
This field specifies the Application Tag Mask expected value.
Used only if the namespace is formatted to use end-to-end
protection information.
.IP "appmask" 12
This field specifies the Application Tag expected value. Used
only if the namespace is formatted to use end-to-end protection
information.
.SH "DESCRIPTION"
The Write Zeroes command is used to set a range of logical blocks to zero.
After successful completion of this command, the value returned by
subsequent reads of logical blocks in this range shall be all bytes cleared
to 0h until a write occurs to this LBA range.
.SH "RETURN"
The nvme command status if a response was received or -1 with errno
set otherwise.
